package com.wmh.baseservice.operationaid.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wmh.baseservice.operationaid.entity.PddStoreData;

import java.util.List;
import java.util.stream.Collectors;

/**
* @author 牛威龙
* @description 针对表【operation_aid_pdd_store_data】的数据库操作Mapper
* @createDate 2023-07-07 12:38:51
* @Entity generator.domain.PddStoreData
*/
public interface PddStoreDataMapper extends BaseMapper<PddStoreData> {
    default List<String> getStoreOptions(){
        return selectList(new LambdaQueryWrapper<PddStoreData>()
                .groupBy(PddStoreData::getStoreName)
                .orderByDesc(PddStoreData::getCreateTime)
                .select(PddStoreData::getStoreName)
        ).stream().map(PddStoreData::getStoreName).collect(Collectors.toList());
    }
}




